package com.knight.study.patterns.tujie.composite;

/**
 * @Author knight
 * @Date 2024/9/11 15:30
 */

public abstract class Entry {
    public abstract String getName();
    public abstract int getSize();
    public Entry add(Entry entry) throws FileTreatmentException{
        throw new FileTreatmentException();
    }
    public void printList() {
        printList("");
    }
    protected abstract void printList(String prefix);
    public String toString() {
        return getName() + "(" + getSize() + ")";
    }
}
